import Vue from 'vue';
import 'lib-flexible/flexible.js';
import '@/assets/css/reset.css';
import axios from 'axios';
import Video from 'video.js'
import 'video.js/dist/video-js.css'
Vue.prototype.$video = Video
Vue.prototype.axios = axios;
axios.defaults.baseURL = 'https://music.aityp.com/';
Vue.filter("format",function(value){
    if(value.length>8){
        value=value.slice(0,8)+'...'
    }
    return value
})
Vue.filter("time",function(val){
    var time=Math.floor(val/1000);
    var s=time%60;
    if(s<10){
        s='0'+s;
    }
    var m=Math.floor(time/60); 
    if(m<10){
        m='0'+m;
    }
    return m+':'+s
})
export default Vue;